/*
 * XML Type:  StopCheckSyncResponse
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.StopCheckSyncResponse
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML StopCheckSyncResponse(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class StopCheckSyncResponseImpl extends net.ofx.types.x2003.x04.impl.AbstractSyncResponseImpl implements net.ofx.types.x2003.x04.StopCheckSyncResponse
{
    
    public StopCheckSyncResponseImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName BANKACCTFROM$0 = 
        new javax.xml.namespace.QName("", "BANKACCTFROM");
    private static final javax.xml.namespace.QName STPCHKTRNRS$2 = 
        new javax.xml.namespace.QName("", "STPCHKTRNRS");
    
    
    /**
     * Gets the "BANKACCTFROM" element
     */
    public net.ofx.types.x2003.x04.BankAccount getBANKACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankAccount target = null;
            target = (net.ofx.types.x2003.x04.BankAccount)get_store().find_element_user(BANKACCTFROM$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "BANKACCTFROM" element
     */
    public void setBANKACCTFROM(net.ofx.types.x2003.x04.BankAccount bankacctfrom)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankAccount target = null;
            target = (net.ofx.types.x2003.x04.BankAccount)get_store().find_element_user(BANKACCTFROM$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.BankAccount)get_store().add_element_user(BANKACCTFROM$0);
            }
            target.set(bankacctfrom);
        }
    }
    
    /**
     * Appends and returns a new empty "BANKACCTFROM" element
     */
    public net.ofx.types.x2003.x04.BankAccount addNewBANKACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankAccount target = null;
            target = (net.ofx.types.x2003.x04.BankAccount)get_store().add_element_user(BANKACCTFROM$0);
            return target;
        }
    }
    
    /**
     * Gets array of all "STPCHKTRNRS" elements
     */
    public net.ofx.types.x2003.x04.StopCheckTransactionResponse[] getSTPCHKTRNRSArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(STPCHKTRNRS$2, targetList);
            net.ofx.types.x2003.x04.StopCheckTransactionResponse[] result = new net.ofx.types.x2003.x04.StopCheckTransactionResponse[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "STPCHKTRNRS" element
     */
    public net.ofx.types.x2003.x04.StopCheckTransactionResponse getSTPCHKTRNRSArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.StopCheckTransactionResponse target = null;
            target = (net.ofx.types.x2003.x04.StopCheckTransactionResponse)get_store().find_element_user(STPCHKTRNRS$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "STPCHKTRNRS" element
     */
    public int sizeOfSTPCHKTRNRSArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(STPCHKTRNRS$2);
        }
    }
    
    /**
     * Sets array of all "STPCHKTRNRS" element
     */
    public void setSTPCHKTRNRSArray(net.ofx.types.x2003.x04.StopCheckTransactionResponse[] stpchktrnrsArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(stpchktrnrsArray, STPCHKTRNRS$2);
        }
    }
    
    /**
     * Sets ith "STPCHKTRNRS" element
     */
    public void setSTPCHKTRNRSArray(int i, net.ofx.types.x2003.x04.StopCheckTransactionResponse stpchktrnrs)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.StopCheckTransactionResponse target = null;
            target = (net.ofx.types.x2003.x04.StopCheckTransactionResponse)get_store().find_element_user(STPCHKTRNRS$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(stpchktrnrs);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "STPCHKTRNRS" element
     */
    public net.ofx.types.x2003.x04.StopCheckTransactionResponse insertNewSTPCHKTRNRS(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.StopCheckTransactionResponse target = null;
            target = (net.ofx.types.x2003.x04.StopCheckTransactionResponse)get_store().insert_element_user(STPCHKTRNRS$2, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "STPCHKTRNRS" element
     */
    public net.ofx.types.x2003.x04.StopCheckTransactionResponse addNewSTPCHKTRNRS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.StopCheckTransactionResponse target = null;
            target = (net.ofx.types.x2003.x04.StopCheckTransactionResponse)get_store().add_element_user(STPCHKTRNRS$2);
            return target;
        }
    }
    
    /**
     * Removes the ith "STPCHKTRNRS" element
     */
    public void removeSTPCHKTRNRS(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(STPCHKTRNRS$2, i);
        }
    }
}
